<?php
class model_mission extends model
{
	function __construct()
	{
		parent::__construct();
		$this->_table = $this->db->options['prefix'].'mission';
		$this->_primary = 'missionid';
		$this->_fields = array('missionid','name','index','urlrule','listarea','list_coincide','linkrule','picoffset','pagerule','pagenumrule','page_coincide','charset','created');
		
		$this->_readonly = array('listid');
		$this->_create_autofill = array('created'=>TIME);
	}

	function add($data)
	{
		return $this->insert($data);
	}
	
	function edit($missionid, $data)
	{
		return $this->update($data, $missionid);	
	}
	
	function copy($missionid)
	{
		return parent::copy_by_id($missionid);
	}
	
	function get($missionid)
	{
		return parent::get($missionid);
	}
	
	function ls()
	{
		return $this->select();
	}
	
	function delete($missionid)
	{
		return parent::delete($missionid);
	}
}